package org.esky.mail;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 * @author Jack.Xu
 * @ClassName: UserAuthenticator
 * @Description: 用户验证
 * @author: Jack.Xu
 * @date: 2013年10月15日 下午5:47:11
 */
public class UserAuthenticator extends Authenticator {
	// 用户名
	private String userName;
	// 密码
	private String password;

	public UserAuthenticator() {
	}

	public UserAuthenticator(String userName, String password) {
		this.userName = userName;
		this.password = password;
	}

	protected PasswordAuthentication getPasswordAuthentication() {
		return new PasswordAuthentication(userName, password);
	}

}
